1 '---------------------------------------------------------------------
2 ' This file is part of the Windows Workflow Foundation SDK Code Samples.
4 ' Copyright (C) Microsoft Corporation. All rights reserved.
6 'This source code is intended only as a supplement to Microsoft
7 'Development Tools and/or on-line documentation. See these other
8 'materials for detailed information regarding Microsoft code samples.
10 'THIS CODE AND INFORMATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY
11 'KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
12 'IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
14 '---------------------------------------------------------------------
16 '------------------------------------------------------------------------------
18 ' This code was generated by a tool.
19 ' Runtime Version:2.0.50727.42
21 ' Changes to this file may cause incorrect behavior and will be lost if
22 ' the code is regenerated.
24 '------------------------------------------------------------------------------
31 <Global.System
.Runtime
.CompilerServices
.CompilerGeneratedAttribute(), _
32 Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0"), _
33 Global.System
.ComponentModel
.EditorBrowsableAttribute(Global.System
.ComponentModel
.EditorBrowsableState
.Advanced
)> _
34 Partial
Friend NotInheritable Class Settings
35 Inherits
Global.System
.Configuration
.ApplicationSettingsBase
37 Private Shared defaultInstance
As Settings
= CType(Global.System
.Configuration
.ApplicationSettingsBase
.Synchronized(New Settings
),Settings
)
39 #Region
"My.Settings Auto-Save Functionality"
40 #
If _MyType
= "WindowsForms" Then
41 Private Shared addedHandler
As Boolean
43 Private Shared addedHandlerLockObject
As New Object
45 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), Global.System
.ComponentModel
.EditorBrowsableAttribute(Global.System
.ComponentModel
.EditorBrowsableState
.Advanced
)> _
46 Private Shared
Sub AutoSaveSettings(ByVal sender
As Global.System
.Object, ByVal e
As Global.System
.EventArgs
)
47 If My
.Application
.SaveMySettingsOnExit
Then
54 Public Shared ReadOnly
Property [Default
]() As Settings
57 #
If _MyType
= "WindowsForms" Then
58 If Not addedHandler
Then
59 SyncLock addedHandlerLockObject
60 If Not addedHandler
Then
61 AddHandler My
.Application
.Shutdown
, AddressOf AutoSaveSettings
67 Return defaultInstance
74 <Global.Microsoft
.VisualBasic
.HideModuleNameAttribute(), _
75 Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
76 Global.System
.Runtime
.CompilerServices
.CompilerGeneratedAttribute()> _
77 Friend Module MySettingsProperty
79 <Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("My.Settings")> _
80 Friend ReadOnly
Property Settings() As Global.Microsoft
.Samples
.Workflow
.WebWorkflow
.Settings
82 Return Global.Microsoft
.Samples
.Workflow
.WebWorkflow
.Settings
.Default